/*
 * Flowable CMMN REST API
 * # flowable / flowəb(ə)l /    - a compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.  - a lightning fast, tried and tested BPMN 2 process engine written in Java. It is Apache 2.0 licensed open source, with a committed community.  - can run embedded in a Java application, or as a service on a server, a cluster, and in the cloud. It integrates perfectly with Spring. With a rich Java and REST API, it is the ideal engine for orchestrating human or system activities.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.ibm.risk.irmp.workflow.client.flowable.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * CaseInstanceResponse
 */

public class CaseInstanceResponse {
  @JsonProperty("id")
  private String id = null;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("url")
  private String url = null;

  @JsonProperty("businessKey")
  private String businessKey = null;

  @JsonProperty("startTime")
  private OffsetDateTime startTime = null;

  @JsonProperty("startUserId")
  private String startUserId = null;

  @JsonProperty("state")
  private String state = null;

  @JsonProperty("ended")
  private Boolean ended = null;

  @JsonProperty("caseDefinitionId")
  private String caseDefinitionId = null;

  @JsonProperty("caseDefinitionUrl")
  private String caseDefinitionUrl = null;

  @JsonProperty("caseDefinitionName")
  private String caseDefinitionName = null;

  @JsonProperty("caseDefinitionDescription")
  private String caseDefinitionDescription = null;

  @JsonProperty("parentId")
  private String parentId = null;

  @JsonProperty("callbackId")
  private String callbackId = null;

  @JsonProperty("callbackType")
  private String callbackType = null;

  @JsonProperty("referenceId")
  private String referenceId = null;

  @JsonProperty("referenceType")
  private String referenceType = null;

  @JsonProperty("variables")
  private List<RestVariable> variables = null;

  @JsonProperty("tenantId")
  private String tenantId = null;

  @JsonProperty("completed")
  private Boolean completed = null;

  public CaseInstanceResponse id(String id) {
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @ApiModelProperty(example = "187", value = "")
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public CaseInstanceResponse name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @ApiModelProperty(example = "processName", value = "")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public CaseInstanceResponse url(String url) {
    this.url = url;
    return this;
  }

   /**
   * Get url
   * @return url
  **/
  @ApiModelProperty(example = "http://localhost:8182/cmmn-repository/case-definitions/caseOne%3A1%3A4", value = "")
  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public CaseInstanceResponse businessKey(String businessKey) {
    this.businessKey = businessKey;
    return this;
  }

   /**
   * Get businessKey
   * @return businessKey
  **/
  @ApiModelProperty(example = "myBusinessKey", value = "")
  public String getBusinessKey() {
    return businessKey;
  }

  public void setBusinessKey(String businessKey) {
    this.businessKey = businessKey;
  }

  public CaseInstanceResponse startTime(OffsetDateTime startTime) {
    this.startTime = startTime;
    return this;
  }

   /**
   * Get startTime
   * @return startTime
  **/
  @ApiModelProperty(example = "2019-04-17T10:17:43.902+0000", value = "")
  public OffsetDateTime getStartTime() {
    return startTime;
  }

  public void setStartTime(OffsetDateTime startTime) {
    this.startTime = startTime;
  }

  public CaseInstanceResponse startUserId(String startUserId) {
    this.startUserId = startUserId;
    return this;
  }

   /**
   * Get startUserId
   * @return startUserId
  **/
  @ApiModelProperty(example = "aUserId", value = "")
  public String getStartUserId() {
    return startUserId;
  }

  public void setStartUserId(String startUserId) {
    this.startUserId = startUserId;
  }

  public CaseInstanceResponse state(String state) {
    this.state = state;
    return this;
  }

   /**
   * Get state
   * @return state
  **/
  @ApiModelProperty(example = "active", value = "")
  public String getState() {
    return state;
  }

  public void setState(String state) {
    this.state = state;
  }

  public CaseInstanceResponse ended(Boolean ended) {
    this.ended = ended;
    return this;
  }

   /**
   * Get ended
   * @return ended
  **/
  @ApiModelProperty(value = "")
  public Boolean getEnded() {
    return ended;
  }

  public void setEnded(Boolean ended) {
    this.ended = ended;
  }

  public CaseInstanceResponse caseDefinitionId(String caseDefinitionId) {
    this.caseDefinitionId = caseDefinitionId;
    return this;
  }

   /**
   * Get caseDefinitionId
   * @return caseDefinitionId
  **/
  @ApiModelProperty(example = "oneTaskCase:1:158", value = "")
  public String getCaseDefinitionId() {
    return caseDefinitionId;
  }

  public void setCaseDefinitionId(String caseDefinitionId) {
    this.caseDefinitionId = caseDefinitionId;
  }

  public CaseInstanceResponse caseDefinitionUrl(String caseDefinitionUrl) {
    this.caseDefinitionUrl = caseDefinitionUrl;
    return this;
  }

   /**
   * Get caseDefinitionUrl
   * @return caseDefinitionUrl
  **/
  @ApiModelProperty(example = "http://localhost:8182/cmmn-repository/case-definitions/caseOne%3A1%3A4", value = "")
  public String getCaseDefinitionUrl() {
    return caseDefinitionUrl;
  }

  public void setCaseDefinitionUrl(String caseDefinitionUrl) {
    this.caseDefinitionUrl = caseDefinitionUrl;
  }

  public CaseInstanceResponse caseDefinitionName(String caseDefinitionName) {
    this.caseDefinitionName = caseDefinitionName;
    return this;
  }

   /**
   * Get caseDefinitionName
   * @return caseDefinitionName
  **/
  @ApiModelProperty(example = "aCaseDefinitionName", value = "")
  public String getCaseDefinitionName() {
    return caseDefinitionName;
  }

  public void setCaseDefinitionName(String caseDefinitionName) {
    this.caseDefinitionName = caseDefinitionName;
  }

  public CaseInstanceResponse caseDefinitionDescription(String caseDefinitionDescription) {
    this.caseDefinitionDescription = caseDefinitionDescription;
    return this;
  }

   /**
   * Get caseDefinitionDescription
   * @return caseDefinitionDescription
  **/
  @ApiModelProperty(example = "A case definition description", value = "")
  public String getCaseDefinitionDescription() {
    return caseDefinitionDescription;
  }

  public void setCaseDefinitionDescription(String caseDefinitionDescription) {
    this.caseDefinitionDescription = caseDefinitionDescription;
  }

  public CaseInstanceResponse parentId(String parentId) {
    this.parentId = parentId;
    return this;
  }

   /**
   * Get parentId
   * @return parentId
  **/
  @ApiModelProperty(example = "123", value = "")
  public String getParentId() {
    return parentId;
  }

  public void setParentId(String parentId) {
    this.parentId = parentId;
  }

  public CaseInstanceResponse callbackId(String callbackId) {
    this.callbackId = callbackId;
    return this;
  }

   /**
   * Get callbackId
   * @return callbackId
  **/
  @ApiModelProperty(example = "123", value = "")
  public String getCallbackId() {
    return callbackId;
  }

  public void setCallbackId(String callbackId) {
    this.callbackId = callbackId;
  }

  public CaseInstanceResponse callbackType(String callbackType) {
    this.callbackType = callbackType;
    return this;
  }

   /**
   * Get callbackType
   * @return callbackType
  **/
  @ApiModelProperty(example = "cmmn-1.1-to-cmmn-1.1-child-case", value = "")
  public String getCallbackType() {
    return callbackType;
  }

  public void setCallbackType(String callbackType) {
    this.callbackType = callbackType;
  }

  public CaseInstanceResponse referenceId(String referenceId) {
    this.referenceId = referenceId;
    return this;
  }

   /**
   * Get referenceId
   * @return referenceId
  **/
  @ApiModelProperty(example = "123", value = "")
  public String getReferenceId() {
    return referenceId;
  }

  public void setReferenceId(String referenceId) {
    this.referenceId = referenceId;
  }

  public CaseInstanceResponse referenceType(String referenceType) {
    this.referenceType = referenceType;
    return this;
  }

   /**
   * Get referenceType
   * @return referenceType
  **/
  @ApiModelProperty(example = "event-to-cmmn-1.1-case", value = "")
  public String getReferenceType() {
    return referenceType;
  }

  public void setReferenceType(String referenceType) {
    this.referenceType = referenceType;
  }

  public CaseInstanceResponse variables(List<RestVariable> variables) {
    this.variables = variables;
    return this;
  }

  public CaseInstanceResponse addVariablesItem(RestVariable variablesItem) {
    if (this.variables == null) {
      this.variables = new ArrayList<RestVariable>();
    }
    this.variables.add(variablesItem);
    return this;
  }

   /**
   * Get variables
   * @return variables
  **/
  @ApiModelProperty(value = "")
  public List<RestVariable> getVariables() {
    return variables;
  }

  public void setVariables(List<RestVariable> variables) {
    this.variables = variables;
  }

  public CaseInstanceResponse tenantId(String tenantId) {
    this.tenantId = tenantId;
    return this;
  }

   /**
   * Get tenantId
   * @return tenantId
  **/
  @ApiModelProperty(value = "")
  public String getTenantId() {
    return tenantId;
  }

  public void setTenantId(String tenantId) {
    this.tenantId = tenantId;
  }

  public CaseInstanceResponse completed(Boolean completed) {
    this.completed = completed;
    return this;
  }

   /**
   * Get completed
   * @return completed
  **/
  @ApiModelProperty(value = "")
  public Boolean getCompleted() {
    return completed;
  }

  public void setCompleted(Boolean completed) {
    this.completed = completed;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CaseInstanceResponse caseInstanceResponse = (CaseInstanceResponse) o;
    return Objects.equals(this.id, caseInstanceResponse.id) &&
        Objects.equals(this.name, caseInstanceResponse.name) &&
        Objects.equals(this.url, caseInstanceResponse.url) &&
        Objects.equals(this.businessKey, caseInstanceResponse.businessKey) &&
        Objects.equals(this.startTime, caseInstanceResponse.startTime) &&
        Objects.equals(this.startUserId, caseInstanceResponse.startUserId) &&
        Objects.equals(this.state, caseInstanceResponse.state) &&
        Objects.equals(this.ended, caseInstanceResponse.ended) &&
        Objects.equals(this.caseDefinitionId, caseInstanceResponse.caseDefinitionId) &&
        Objects.equals(this.caseDefinitionUrl, caseInstanceResponse.caseDefinitionUrl) &&
        Objects.equals(this.caseDefinitionName, caseInstanceResponse.caseDefinitionName) &&
        Objects.equals(this.caseDefinitionDescription, caseInstanceResponse.caseDefinitionDescription) &&
        Objects.equals(this.parentId, caseInstanceResponse.parentId) &&
        Objects.equals(this.callbackId, caseInstanceResponse.callbackId) &&
        Objects.equals(this.callbackType, caseInstanceResponse.callbackType) &&
        Objects.equals(this.referenceId, caseInstanceResponse.referenceId) &&
        Objects.equals(this.referenceType, caseInstanceResponse.referenceType) &&
        Objects.equals(this.variables, caseInstanceResponse.variables) &&
        Objects.equals(this.tenantId, caseInstanceResponse.tenantId) &&
        Objects.equals(this.completed, caseInstanceResponse.completed);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, url, businessKey, startTime, startUserId, state, ended, caseDefinitionId, caseDefinitionUrl, caseDefinitionName, caseDefinitionDescription, parentId, callbackId, callbackType, referenceId, referenceType, variables, tenantId, completed);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CaseInstanceResponse {\n");

    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    url: ").append(toIndentedString(url)).append("\n");
    sb.append("    businessKey: ").append(toIndentedString(businessKey)).append("\n");
    sb.append("    startTime: ").append(toIndentedString(startTime)).append("\n");
    sb.append("    startUserId: ").append(toIndentedString(startUserId)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    ended: ").append(toIndentedString(ended)).append("\n");
    sb.append("    caseDefinitionId: ").append(toIndentedString(caseDefinitionId)).append("\n");
    sb.append("    caseDefinitionUrl: ").append(toIndentedString(caseDefinitionUrl)).append("\n");
    sb.append("    caseDefinitionName: ").append(toIndentedString(caseDefinitionName)).append("\n");
    sb.append("    caseDefinitionDescription: ").append(toIndentedString(caseDefinitionDescription)).append("\n");
    sb.append("    parentId: ").append(toIndentedString(parentId)).append("\n");
    sb.append("    callbackId: ").append(toIndentedString(callbackId)).append("\n");
    sb.append("    callbackType: ").append(toIndentedString(callbackType)).append("\n");
    sb.append("    referenceId: ").append(toIndentedString(referenceId)).append("\n");
    sb.append("    referenceType: ").append(toIndentedString(referenceType)).append("\n");
    sb.append("    variables: ").append(toIndentedString(variables)).append("\n");
    sb.append("    tenantId: ").append(toIndentedString(tenantId)).append("\n");
    sb.append("    completed: ").append(toIndentedString(completed)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
